package bb.lanxing.lib.devices.sprint.utils;

public final class StringDecimalUtil {
    public static String format(String str, int i) {
        int indexOf = str != null ? str.indexOf(".") : -1;
        return indexOf != -1 ? str.substring(0, Math.min((str.length() - indexOf) + indexOf, indexOf + i + 1)) : str;
    }
}
